import request from '@/utils/request'

// 查询奖项登记列表
export function listJxdj(query) {
  return request({
    url: '/kjcg/jxdj/list',
    method: 'get',
    params: query
  })
}

// 查询奖项登记详细
export function getJxdj(jxdjId) {
  return request({
    url: '/kjcg/jxdj/' + jxdjId,
    method: 'get'
  })
}

// 新增奖项登记
export function addJxdj(data) {
  return request({
    url: '/kjcg/jxdj',
    method: 'post',
    data: data
  })
}

// 修改奖项登记
export function updateJxdj(data) {
  return request({
    url: '/kjcg/jxdj',
    method: 'put',
    data: data
  })
}

// 删除奖项登记
export function delJxdj(jxdjId) {
  return request({
    url: '/kjcg/jxdj/' + jxdjId,
    method: 'delete'
  })
}

// 获得奖项登记主键ID
export function getJxDjId() {
  return request({
    url: '/kjcg/jxdj/getJxDjId',
    method: 'get'
  })
}

// 新增附件
export function insertJxdjFjByJxdjId(data) {
  return request({
    url: '/kjcg/jxdj/add/File/By/subId',
    method: 'post',
    data: data
  })
}

// 根据主表ID查询附件列表
export function selectJxdjFjList(jxdjId) {
  return request({
    url: '/kjcg/jxdj/get/FileList/By/subId?sId=' + jxdjId,
    method: 'get'
  })
}

// 删除奖项登记附件
export function deleteJxdjFjByFjIds(fjId) {
  return request({
    url: '/kjcg/jxdj/fj/' + fjId,
    method: 'delete'
  })
}
